USE [QLDL]
GO

/****** Object:  StoredProcedure [dbo].[sp_SuaThongTinMatHang]    Script Date: 01/03/2011 15:28:19 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE procedure [dbo].[sp_SuaThongTinMatHang]
	@MaMatHang nvarchar(10), @MaDonViTinh nvarchar(10), @DonGia money
as
begin
	if not exists(select * from DONVITINH where MaDonViTinh = @MaDonViTinh)
		return 1
		
	update MATHANG set MaDonViTinh = @MaDonViTinh, DonGia = @DonGia where MaMatHang = @MaMatHang
	return 0
end
GO


